<template>
	<view class="body p30">
		<view class="bg-white br32 p40">
			<child :childList="childList"></child>
		</view>
		<tabbar :active="1"></tabbar>
	</view>
</template>

<script>
export default {
	data() {
		return {
			childList: [],
		};
	},
	onShow() {
		this.getList();
	},
	methods: {
		async getList() {
			const res = await this.$request({
				url: this.$api.parent,
				data: {
					parentId: uni.getStorageSync("user").id || false,
				},
			});
			this.childList = res;
		},
	},
};
</script>

<style scoped lang="scss"></style>
